iBATIS.NET Class Library DataMapper V1.6.1, DataAccess V1.9.1

ISqlMapper.QueryForObject Method (String, Object, T)

Executes a Sql SELECT statement that returns a single object of the type of the resultObject parameter.

[Visual Basic]
Function QueryForObject( _
   ByVal String As String, _
   ByVal Object As Object, _
   ByVal ISqlMapper.T As ``0 _
) As ``0
[C#]
T <T>QueryForObject(
   String statementName,
   Object parameterObject,
   ISqlMapper.T instanceObject
);

Parameters

statementName
The name of the sql statement to execute.
parameterObject
The object used to set the parameters in the SQL.
instanceObject
An object of the type to be returned.

Return Value

The single result object populated with the result set data.

See Also

ISqlMapper Interface | IBatisNet.DataMapper Namespace | ISqlMapper.QueryForObject Overload List